home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Oberon / texts / SymbolFileFormat.txt < prev    next >
Text File  |  1995-07-02  |  3KB  |  71 lines

  1.      $RCSfile: SymbolFileFormat.txt $
  2.   Description: Symbol file format used by Oberon-A
  3.  
  4.    Created by: fjc (Frank Copeland)
  5.     $Revision: 1.5 $
  6.       $Author: fjc $
  7.         $Date: 1995/07/02 17:07:04 $
  8.  
  9.   Copyright © 1994, Frank Copeland.
  10.   This file is part of Oberon-A.
  11.   See Oberon-A.doc for conditions of use and distribution.
  12.   ________________________________________________________________________
  13.  
  14.  
  15.   INTRODUCTION
  16.  
  17.   This document describes the symbol file format used by Oberon-A.
  18.  
  19.   SYMBOL FILE FORMAT
  20.  
  21.   SymTag = 53594D09H; (* "SYM" + version # *)
  22.  
  23.   (* structure forms *)
  24.   Undef * = 0H; Byte * = 1H; Bool * = 2H; Char * = 3H; SInt * = 4H;
  25.   Int * = 5H; LInt * = 6H; Real * = 7H; LReal * = 8H; BSet * = 9H;
  26.   WSet * = 0AH; Set * = 0BH; String * = 0CH; NilTyp * = 0DH;
  27.   NoTyp * = 0EH; PtrTyp * = 0FH; CPtrTyp * = 10H; BPtrTyp * = 11H;
  28.   Word * = 12H; Longword * = 13H; TypeTag * = 14H;
  29.  
  30.   (* terminal symbols for symbol file elements *)
  31.   eUndef = 0H; eCon = 1H; eTypE = 2H; eTyp = 3H; eVar = 4H; eXProc = 5H;
  32.   eLibCall = 6H; eM2Proc = 7H; eCProc = 8H; eAProc = 9H; ePointer = 0AH;
  33.   eProcTyp = 0BH; eArray = 0CH; eDynArr = 0DH; eRecord = 0EH;
  34.   eParList = 0FH; eValPar = 10H; eVarPar = 11H; eVarArg = 12H;
  35.   eFldList = 13H; eFld = 14H; eHPtr = 15H; eHProc = 16H; eTProcE = 17H;
  36.   eTProc = 18H; eFixup = 19H; eMod = 1AH; eExtLib = 1BH; eCallBack = 1CH;
  37.   eCBackTyp = 1DH;
  38.  
  39.   SymbolFile = SymTag:4 modAnchor {element}.
  40.   modAnchor = eMod key:4 name.
  41.  
  42.   element = eCon constant
  43.             | (eTypE | eTyp) ref mno name
  44.             | (eVar | eFld) ref offset visible name
  45.             | (eValPar | eVarPar) ref offset name
  46.             | eParList {element}
  47.                 ( (eXProc | eCallBack) ref
  48.                 | (eLibCall | eTProcE) ref ref offset
  49.                 | (eM2Proc | eCProc | eAProc) ref name
  50.                 | eLibCall2 ref offset offset )
  51.                 name
  52.             | ePointer ref mno sysflg dscadr
  53.             | eParList {element} (eProcTyp | eCBackTyp) ref mno
  54.             | eArray ref mno size bndadr nofel
  55.             | eDynArr ref mno size lenoff
  56.             | eFldList {element} eRecord ref mno size sysflg dscadr
  57.             | eHPtr offset
  58.             | eTProc ref offset
  59.             | eFixup ref ref
  60.             | eExtLib name
  61.             | modAnchor.
  62.  
  63.   constant = (Byte | Bool | Char | SInt | SSet) val name
  64.              | (Int | Set) val name
  65.              | (LInt | Real | LReal | LSet) val name
  66.              | String sadr len [char] name
  67.              | Nil name.
  68.  
  69.   name = {char} 0X
  70.  
  71.